package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface EmployeeMapper {
    void deleteByPrimaryKey(Long id);

    void insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    void updateByPrimaryKey(Employee record);

    int queryForCount(EmployeeQueryObject qo);

    List<Employee> queryForList(EmployeeQueryObject qo);

    void changeState(Long id);

    List<Employee> queryEmployee();


    //删除员工与角色的关系
    void deleteEmpRoleRelation(Long empId);

    //保存员工与角色的关系
    void saveEmpRoleRelation(@Param("empId") Long empId, @Param("roleId") Long roleId);

    Employee checkName(String username);
}